package com.zhangzhan.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;


/**
 * @ClassName CommonExceptionEnum
 * @Description: 通用异常返回枚举
 * @Author gaojintao
 * @Date 2020/2/12 15:10
 * @Version V1.0
 **/
@AllArgsConstructor
@Getter
public enum CommonExceptionEnum {

    /**
     * 300 - 500 多为 http 常见的错误码
     */
    ERROR(-1, "系统错误"),
    ERROR500(500, "系统错误"),
    SUCESS(200, "操作成功"),
    NOAUTH(401, "未授权"),
    NOT_FOUND(404, "请求的信息不存在"),
    MEHTOD_NOT_ALLOWED(405, "方法不允许"),
    NOSERVICE(503, "服务不可用"),
    SYS_BUSY(606, "系统忙稍后再试"),
    ID_GENERATE_ERROR(607, "生成主键失败！"),
    REPEAT_SUBMIT(608, "表单重复提交"),
    DATA_DUPLICATE_INSERT(609, "数据重复插入"),
    SQL_EXCEPTION(610, "sql执行异常"),
    FEIGN_INVOKE_EXCEPTION(619, "feign调用异常"),
    N4_MESSAGE_ERROR(620, "N4返回有错误信息，请查看详情！"),
    HTTP_MESSAGE_ERROR(621, "请求链接错误，请稍后重试，或联系管理员处理！"),
    CHECK_NO(604, "该值不可用，系统中已存在！"),
    /*新加入校验状态码*/
    WCZZL(605,"WCZZL"),
    WHGBA(606,"WHGBA"),
    HCQCPZ(607,"HCQCPZ"),
    NMXCZBSX(608,"NMXCZBSX"),
    LING(0,"LING"),
    DATE_CHANGE_ERROR(609,"操作的数据发生变动"),
    //自动出闸
    AUTOCZ_NOID(630, "NOID"),
    AUTOCZ_ZYJK(631, "ZYJK"),


    FILE_NOT_FIND_ERROR(700, "文件未找到！"),
    FILE_NOT_MATCH_ERROR(701, "文件类型不匹配！"),
    EXCEL_IS_NULL_ERROR(702, "excel为空！"),
    EXCEL_IMPORT_ERROR(703, "excel导入失败！"),
    EXCEL_EXPORT_ERROR(704, "excel导出失败！"),
    EXCEL_EXPORTANDUPLOAD_ERROR(705, "excel导出上传失败！"),
    NOF_FIND_CLASS_ERROR(706, "未扫描到类信息！"),
    LOAD_IL8N_MESSAGES_ERROR(707, "加载国际信息配置到缓存失败！"),
    MAX_UPLOAD_SIZE_ERROR(708, "文件大小超出限制！"),
    DATA_CHANGE_ERROR(808, "您操作的数据已发生变动！"),
    SQL_INJECT_ERROR(809, "sql注入异常！"),
    RETRY_FEIGN_ERROR(811, "feign 接口 重试调用异常！"),

    NO_CONNECT_WESOCKET_ERROR(900, "没有连接！请先建立连接再推送消息"),
    PARAM_ERROR(-2, "参数错误！"),
    PARAM_REPEAT_ERROR(-3, "参数数据重复！"),
    LIMIT_ERROR(-4, "限流！系统忙请稍后"),
    REDIS_ERROR(-5, "redis 操作异常"),
    NULL_POINTER(-6, "空指针异常！");

    private long code;
    private String msg;
}
